<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width = device-width, initial-scale = 1.0, maximum-scale = 1.0, user-scalable = 0">
	
<title>数字资产</title>

<link href="../../public/css/base.css" rel="stylesheet">
<link href="../../public/css/trade.css" rel="stylesheet">
<link href="../../public/css/user.css" rel="stylesheet">
<script src="../../public/js/jquery.min.2.1.4.js"></script>
<script src="../../public/js/md5.js"></script>
<script src="../../public/js/sort_ascii.js"></script>
<script src="../../public/js/f_data.js"></script>
</head>

<body>
<header class="header">
	<div class="header-return">
	    <a href="javascript:history.go(-1);"></a>
	</div>
	
	<div class="logo">数字资产</div>
	
	<div class="header-btn">
		<a href="DigitalAssetsRecord.html">交易记录</a>
	</div>
</header>

<section class="container">
	<div class="digital-balance">
		<div class="digital-balance-current">
			<span>SYB当前价格</span>
			<h3>38.7310</h3>
		</div>
		
		<div class="digital-toolbar">
			<ul>
				<li>
					<a href="DigitalAssetsOut.html" class="digital-toolbar-1">
						<i></i>
						<span>转出</span>
					</a>
				</li>

				<li>
					<a href="../DigitalAssets/CrowdFunding.html" class="digital-toolbar-2">
						<i></i>
						<span>众筹</span>
					</a>
				</li>

				<li>
					<a href="../DigitalAssets/VPayCenter.html" class="digital-toolbar-3">
						<i></i>
						<span>V宝</span>
					</a>
				</li>

				<li>
					<a href="../trade/usdtbycash.html" class="digital-toolbar-4">
						<i></i>
						<span>交易</span>
					</a>
				</li>
			</ul>
		</div>
	</div>
		
	<div class="clr"></div>
	
	<div class="digital-ads">
		<a href="../User/Share.html">
			<img src="../../public/images/assets/ads.jpg">
		</a>
	</div>
	
	<div class="digital-assets">
		<div class="digital-assets-list">
			<h3 class="digital-coin-1">SYB</h3>
			
			<div class="digital-assets-details">
				<div class="digital-assets-account">
					<h5>0.0000</h5>
					<span>SYB资产</span>
				</div>
				
				<div class="digital-assets-price">
					<h5>38.7310</h5>
					<span>当前价格</span>
				</div>
				
				<div class="digital-assets-btn">
					<a href="../trade/sybbycash.html">买入交易</a>
					<a href="../trade/usdtbycash.html">卖出交易</a>
				</div>
			</div>
		</div>
		
		<div class="digital-assets-list">
			<h3 class="digital-coin-2">USDT</h3>
			
			<div class="digital-assets-details">
				<div class="digital-assets-account">
					<h5>0.0000</h5>
					<span>USDT资产</span>
				</div>
				
				<div class="digital-assets-price">
					<h5>10.7810</h5>
					<span>当前价格</span>
				</div>
				
				<div class="digital-assets-btn">
					<a href="../trade/usdtbycash.html">买入交易</a>
					<a href="../trade/usdtbycash.html">卖出交易</a>
				</div>
			</div>
		</div>
	</div>
	<div class="clr"></div>
</section>
<div class="nav">
	<ul>
		<li id='pay'>
			<a href="../wallet/digitalassets.html" class="nav-assets">
				<i></i>
				<span>交易</span>
			</a>
		</li>
		<li id='shop'>
			<a href="../shop/shopindex.html" class="scan-btn">
				<i></i>
				<!--<span>扫码转账</span>-->
			</a>
		</li>
		<li id='zichan'>
			<a href="../home/index.html" class="nav-shop">
				<i></i>
				<span>资产</span>
			</a>
		</li>
	</ul>
</div>

<script>
	
	var g_u_ids = checktoken('uid','token');
	var g_u_id = getCookie('uid');
	var g_token = getCookie('token');
	var g_time = Date.parse(new Date())/1000;
	let g_datas = {g_u_id,g_token,g_time};
    let g_data = sort_ascii(g_datas);
	var g_code = sort_code(g_data);

	$.ajax({
	    type: 'post',
	    url: url+"/index.php/api/Wallet/wallet_index",
	    data:{u_id:g_u_id,token:g_token,time:g_time,code:g_code},
	    success: function (msg){
	    	// alert(msg.data);
	    		if(msg.code == 1){
	    			
	    			// setCookie('token',msg.data.token,1);
				}
				if(msg.code == 0){
	    			location.href="../login/login.html"
				}
	    },
        error : function() {
	          	//提交失败的提示词或者其他反馈代码
	        	alert('失败！');
        }
	 });


	$(function(){
		
		//搜索框清除
		$('#search').on('input',function(){
			 
			if(!($('#search').val()=='')){
				$('.clear-keyword').show();
			}else{
				$('.clear-keyword').hide();
			}
			 
		});
		
		$('.clear-keyword').click(function(){
			$('#search').val('');
			$(this).hide();
		});
		
		
		//筛选
		$('.sort-bar li').click(function(){
			$(this).addClass('active').siblings().removeClass('active');
			
			if( $(this).attr('id')=='openSort'){
				$(this).toggleClass('open');
				$('body').css({'width':'100%','height':'100%','overflow':'hidden'});
			}
			else{
				$('#openSort').removeClass('open');
				$('body').css({'width':'auto','height':'auto','overflow':'auto'});
			}
			
		});
		
		$('.sort-bar li .sort-box').click(function(){
			$('#openSort').removeClass('open');
			$('body').css({'width':'auto','height':'auto','overflow':'auto'});
		});
		
		
		//$('#openSort').click(function(){
//			$(this).addClass('open');
//			$('.sort-box').show();
//			
//			$('body').css({'width':'100%','height':'100%','overflow':'hidden'});
//		});
		
	})
</script>
</body>
</html>
